apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  annotations:
    nginx.ingress.kubernetes.io/rewrite-target: ${appPath}/$1
  name: '${ingressName}'
  namespace: '${namespace}'
  labels:
    service: '${moduleName}'
    path: '${domain}'
    requestPath: '${requestPathReplace}'
    appPath: '${appPathReplace}'
spec:
<#if tslCert?? && ''!=tslCert>
  tls:
  - secretName: '${tslCert}'
</#if>
  rules:
    - host: '${domain}'
      http:
        paths:
          - backend:
              serviceName: '${moduleName}'
              servicePort: ${servicePort?c}
            path: '${requestPath}/(.*)'
